package test;


import java.util.List;

import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import cn.asiainfo.apportion.mapper.AssignStatementMapper;
import cn.asiainfo.apportion.po.AssignStatement;
import cn.asiainfo.apportion.po.AssignStatementExample;

public class AssignStatementMapperTest1 {

	private ApplicationContext applicationContext;
	private AssignStatementMapper assignStatementMapper;

	@Before
	public void setUp() throws Exception {
		applicationContext = new ClassPathXmlApplicationContext("spring/applicationContext.xml");
		assignStatementMapper = (AssignStatementMapper) applicationContext.getBean("assignStatementMapper");
	}

	@Test
	public void testSelectByExample() {
		AssignStatementExample assignStatementExample = new AssignStatementExample();
		assignStatementExample.createCriteria().andOperationIdEqualTo(261883).andStatementSeqEqualTo(1);
		List<AssignStatement> list = assignStatementMapper.selectByExample(assignStatementExample);
		for (AssignStatement assignStatement:list){
			System.out.println(assignStatement.getOperationId());
			
		}
	}

}
